import Layout from '@/layout'
export default {
  path: '/approvals',
  name: 'approvals', // 给路由规则加一个name
  component: Layout, // 每个子模块 其实 都是外层是layout  组件位于layout的二级路由里面
  children: [{
    path: '', // 二级路由不带/,这里表示默认显示
    name: 'approvals',
    component: () => import('@/views/approvals'), // 按需引入
    meta: { // 路由元信息  其实就是存储数据的对象 我们可以在这里放置一些信息
      title: '审批', // meta属性的里面的属性 随意定义 这里用title,因为左侧导航会读取我们的路由里的meta里面的title作为显示菜单名称
      icon: 'tree-table'
    }
  },
  {
    path: 'salaryApproval/:id',
    component: () => import('@/views/approvals/salary'),
    name: 'salaryApproval',
    hidden: true,
    meta: {
      title: '工资审核',
      icon: 'approval', noCache: true }
  },
  {
    path: 'enterApproval/:id',
    component: () => import('@/views/approvals/enter'),
    name: 'enterApproval',
    hidden: true,
    meta: {
      title: '入职审核',
      icon: 'approval', noCache: true }
  },
  {
    path: 'leaveApproval/:id',
    component: () => import('@/views/approvals/leave'),
    name: 'leaveApproval',
    hidden: true,
    meta: {
      title: '申请请假',
      icon: 'approval', noCache: true }
  },
  {
    path: 'quitApproval/:id',
    component: () => import('@/views/approvals/quit'),
    name: 'quitApproval',
    hidden: true,
    meta: {
      title: '申请离职',
      icon: 'approval', noCache: true }
  },
  {
    path: 'overtimeApproval/:id',
    component: () => import('@/views/approvals/overtime'),
    name: 'overtimeApproval',
    hidden: true,
    meta: {
      title: '加班申请',
      icon: 'approval', noCache: true }
  },
  {
    path: 'securitySetting',
    component: () => import('@/views/approvals/security'),
    name: 'securitySetting',
    hidden: true,
    meta: {
      title: '设置',
      icon: 'approval', noCache: true }
  }]
}
